﻿
using System;
using System.Data;
using Microsoft.AspNetCore.Mvc;
using NetCore.ORM;
namespace NetCore.Api.Model
{
    /// <summary>
    /// 接口用户表
    /// </summary>
    [Table("API_Users", IsDeleted = true, IsCreated = true, IsLastModify = true, IsTable = true)]
    public partial class APIUsersEntity : EntityBase
    {
        #region 常量
        public const string _TableName = "API_Users";

        /// <summary>
        /// 主键字段名
        /// </summary>
        public const string _PrimaryKeyName = "UserNo";

        /// <summary>
        /// 用户名称
        /// </summary>
        public const string __UserName = "UserName";

        /// <summary>
        /// 密码
        /// </summary>
        public const string __Password = "Password";

        /// <summary>
        /// 密钥
        /// </summary>
        public const string __Md5Key = "Md5Key";

        /// <summary>
        /// 最后登录时间
        /// </summary>
        public const string __LastLoginTime = "LastLoginTime";

        /// <summary>
        /// 缓存时间
        /// </summary>
        public const string __CacheTime = "CacheTime";

        /// <summary>
        /// 描述
        /// </summary>
        public const string __Remark = "Remark";
        #endregion
        #region 属性
        private string _UserNo;
        /// <summary>
        /// 用户编号
        /// </summary>
        [DbColumn("UserNo", LocalName = "用户编号", ColumnType = "string", IsPrimaryKey = true, AllowDBNull = false, MaxLength = 20, ControlType = 2)]
        public virtual string UserNo
        {
            get
            {
                return _UserNo;
            }
            set
            {
                _UserNo = value;

            }
        }
        private string _UserName;
        /// <summary>
        /// 用户名称
        /// </summary>
        [DbColumn("UserName", LocalName = "用户名称", ColumnType = "string", AllowDBNull = false, MaxLength =50, ControlType = 1)]
        public virtual string UserName
        {
            get
            {
                return _UserName;
            }
            set
            {
                SetUpdateField(__UserName);
                _UserName = value;

            }
        }
        private string _Password;
        /// <summary>
        /// 密码
        /// </summary>
        [DbColumn("Password", LocalName = "密码", ColumnType = "string", AllowDBNull = false, MaxLength = 50, ControlType = 1)]
        public virtual string Password
        {
            get
            {
                return _Password;
            }
            set
            {
                SetUpdateField(__Password);
                _Password = value;

            }
        }
        private string _Md5Key;
        /// <summary>
        /// 密钥
        /// </summary>
        [DbColumn("Md5Key", LocalName = "密钥", ColumnType = "string", AllowDBNull = false, MaxLength = 50, ControlType = 1)]
        public virtual string Md5Key
        {
            get
            {
                return _Md5Key;
            }
            set
            {
                SetUpdateField(__Md5Key);
                _Md5Key = value;

            }
        }
        private DateTime? _LastLoginTime;
        /// <summary>
        /// 最后登录时间
        /// </summary>
        [DbColumn("LastLoginTime", LocalName = "最后登录时间", ColumnType = "datetime", AllowDBNull = true, VaildKey = "IsDate", ControlType = 7)]
        public virtual DateTime? LastLoginTime
        {
            get
            {
                return _LastLoginTime;
            }
            set
            {
                SetUpdateField(__LastLoginTime);
                _LastLoginTime = value;

            }
        }
        private int _CacheTime;
        /// <summary>
        /// 缓存时间
        /// </summary>
        [DbColumn("CacheTime", LocalName = "缓存时间", ColumnType = "int", AllowDBNull = false, VaildKey = "number", ControlType = 6)]
        public virtual int CacheTime
        {
            get
            {
                return _CacheTime;
            }
            set
            {
                SetUpdateField(__CacheTime);
                _CacheTime = value;

            }
        }
        private string _Remark;
        /// <summary>
        /// 描述
        /// </summary>
        [DbColumn("Remark", LocalName = "描述", ColumnType = "string", IsGridVisible = false, MaxLength = 500, ControlType = 1)]
        public virtual string Remark
        {
            get
            {
                return _Remark;
            }
            set
            {
                SetUpdateField(__Remark);
                _Remark = value;

            }
        }
        #endregion

    }
}
